//
//  CalenderBtn.m
//  Qihuo
//
//  Created by Vencoo on 13-12-22.
//  Copyright (c) 2013年 Vencoo. All rights reserved.
//

#import "CalenderBtn.h"

@implementation CalenderBtn

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        UIImage *green = [UIImage imageNamed:@"green"];
        UIImage *red = [UIImage imageNamed:@"red"];
        for (int i = 0; i < 3; i ++)
        {
//            self.layer.borderWidth = 2;
            _greenView = [[UIImageView alloc]initWithImage:green];
            _greenView.frame = CGRectMake(self.frame.size.width - green.size.width, (self.frame.size.height/3 - green.size.height)/2, green.size.width, green.size.height);
            [self addSubview:_greenView];
            _greenView.hidden = 1;
            
            _redView = [[UIImageView alloc]initWithImage:red];
            _redView.frame = CGRectMake(_greenView.frame.origin.x, (self.frame.size.height/3 - green.size.height)/2 + self.frame.size.height/3, green.size.width, green.size.height);
            [self addSubview:_redView];
            _redView.hidden = 1;
            
            _detailView = [[UIImageView alloc]init];
            [self addSubview:_detailView];
            _detailView.hidden = 1;
        }
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
